:root {
    --primary-color: #4a90e2;
    --secondary-color: #2c3e50;
    --background-color: #f5f6fa;
    --card-background: #ffffff;
    --text-color: #2c3e50;
    --border-radius: 12px;
    --transition: all 0.3s ease;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 15px rgba(0, 0, 0, 0.1);
}

/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* 布局容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* 搜索区域 */
.search-container {
    text-align: center;
    margin-bottom: 3rem;
    width: 100%;
}

h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* 搜索区域 */
.search-box {
    display: flex;
    max-width: 600px;
    margin: 0 auto 1rem;
    position: relative;
}

input[type="text"] {
    flex: 1;
    padding: 0.8rem 1rem;
    font-size: 1.1rem;
    border: 2px solid #e1e1e1;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    transition: var(--transition);
    outline: none;
}

input[type="text"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

button[type="submit"] {
    padding: 0.8rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    cursor: pointer;
    transition: var(--transition);
    min-width: 60px;
}

button[type="submit"]:hover {
    background-color: #357abd;
}

button[type="submit"]:active {
    transform: translateY(1px);
}

.search-options {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
}

select {
    padding: 0.5rem;
    border-radius: var(--border-radius);
    border: 2px solid #e1e1e1;
    background-color: white;
    cursor: pointer;
}

/* 图标卡片 */
.icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.icon-card {
    background: var(--card-background);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.icon-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* 图标图片 */
.icon-image {
    text-align: center;
    margin-bottom: 1rem;
}

.icon-image img {
    width: 100px;
    height: 100px;
    border-radius: 22px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.icon-image img:hover {
    transform: scale(1.05);
}

/* 应用名称 */
.app-name {
    font-size: 1.1rem;
    margin: 0.5rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-color);
}

/* 下载按钮 */
.download-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 12px;
    width: 100%;
    padding: 0 2px;
}

.download-options-row {
    display: flex;
    gap: 6px;
    width: 100%;
}

.size-btn {
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-size: 0.85rem;
    text-align: center;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    border: none;
    box-shadow: var(--shadow-sm);
}

.size-btn:hover {
    background-color: #357abd;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.size-btn:active {
    transform: translateY(0);
}

.size-btn-small {
    padding: 8px 0;
    min-height: 65px;
    max-width: calc(33.33% - 4px);
}

.size-btn-large {
    padding: 8px 0;
    min-height: 45px;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
}

/* 返回顶部按钮 */
#back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: none;
    padding: 1rem;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .icon-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .icon-card {
        padding: 1.2rem;
        gap: 0.8rem;
    }
    
    .size-btn-small {
        min-height: 50px;
        padding: 6px 0;
    }
    
    .size-btn-large {
        min-height: 38px;
        padding: 6px 0;
    }
    
    .size-label {
        font-size: 0.85rem;
    }
    
    .size-desc {
        font-size: 0.65rem;
    }
}

/* 页脚样式 */
footer {
    background-color: var(--secondary-color);
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
    width: 100%;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    text-decoration: none;
    transition: var(--transition);
    padding: 0.5rem;
}

.social-links a:hover {
    color: var(--primary-color);
}